<?php
defined('_JEXEC') or die('Restricted access');
$tmpl = "templates/tpl_automobil/";
$db = JFactory::getDBO();
$sess = JFactory::getSession();
?>
<script type="text/javascript" src="<?php echo $tmpl;?>js/tooltips.js"></script>

<link rel="stylesheet" href="<?php echo $tmpl;?>css/jquery.ui.all.css"/>
<script src="<?php echo $tmpl;?>js/jquery.ui.core.js"></script>
<script src="<?php echo $tmpl;?>js/jquery.ui.widget.js"></script>
<script src="<?php echo $tmpl;?>js/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="<?php echo $tmpl;?>js/jquery.ui.datepicker-da.js"></script>
<link rel="stylesheet" href="<?php echo $tmpl;?>css/datepicker.css"/>
<script>
$(document).ready(function(){
	checkTire = function(){
		if($('#stand').is(':checked')){
			$('#alu_tire').attr('disabled','disabled');
			$('#stand_tire').removeAttr('disabled');
		}
		if($('#alu').is(':checked')){
			$('#stand_tire').attr('disabled','disabled');
			$('#alu_tire').removeAttr('disabled');
		}
	}
	
	checkTire();
		
	submitCar = function(){
		document.getElementById('sendInformationCar').click();
	}
});
</script>
<p><span class="float_left f28">Tilmelding af bil</span><span class="link-login"><a href="index.php?option=com_user&view=user&layout=profile&Itemid=13">
  <?php if($user->guest==0) {echo  "Min Profil";} ;?>
  </a><a href="index.php?option=com_user&view=login&task=logout&Itemid=13" class="m12l">
  <?php if($user->guest==0) {echo  "Log ud";};?>
  </a></span></p>
<div class="cb"></div>
<div class="tt m10b"></div>
<div class="p5t">
    <div class="status-step1"></div>
    <div class="w739 form_tilmelding1 float_left">
    	<form name="infoCar" id="infoCar" method="post">
            <input type="submit" name="sendInformationCar" id="sendInformationCar" style="display:none" />
            <input type="hidden" name="option" value="com_ecommerce" />
            <input type="hidden" name="task" value="saveStep2" />
            <div class="form_tilmelding3 float_left m20t">
            <h3 class="boder_b_d">Sikkerhed</h3>
            <table width="303" cellspacing="0" cellpadding="0" border="0" class="m3b frm-other">
              <tbody><tr>
                <td><input type="checkbox" id="abs" name="abs" <?php if($sess->get('abs')) echo 'checked="checked"';?>/>
                  <label for="checkbox">ABS-bremser</label></td>
                <td><input type="checkbox" id="alarm" name="alarm" <?php if($sess->get('alarm')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Alarm</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="antispin" name="antispin" <?php if($sess->get('antispin')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Antispin</label></td>
                <td><input type="checkbox" id="start" name="start" <?php if($sess->get('start')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Startspærre</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="esp" name="esp" <?php if($sess->get('esp')) echo 'checked="checked"';?>/>
                  <label for="checkbox">ESP / ESC </label>
                  <!--<a class="tooltip-eps" href="#"><img src="<?php echo $tmpl;?>images/ico_info.png" alt="" /> 
                       <div class="wrapper-tooltip">            
                            <div class="tooltip-top"></div>
                            <div class="tooltip-content">
							 	<?php 
                                $db->setQuery("SELECT title, introtext FROM #__content WHERE id = 18");
                                $esp_note = $db->loadObject();
                                ?>
                                 <h6><?php echo $esp_note->title;?></h6>
                                 <?php echo $esp_note->introtext;?>
                            </div>
                            <div class="tooltip-bottom"></div>
                        </div>
                    </a>--></td>
                <td>
                  <label for="checkbox">Airbags (min.) </label>
                  <select style="text-align:center;" class="w50" name="airbag">
                    <option <?php if($sess->get('airbag') == 0) echo 'selected="selected"';?> value="0">0</option>
                    <option <?php if($sess->get('airbag') == 1) echo 'selected="selected"';?> value="1">1</option>
                    <option <?php if($sess->get('airbag') == 2) echo 'selected="selected"';?> value="2">2</option>
                    <option <?php if($sess->get('airbag') == 3) echo 'selected="selected"';?> value="3">3</option>
                    <option <?php if($sess->get('airbag') == 4) echo 'selected="selected"';?> value="4">4</option>
                    <option <?php if($sess->get('airbag') == 5) echo 'selected="selected"';?> value="5">5</option>
                    <option <?php if($sess->get('airbag') == 6) echo 'selected="selected"';?> value="6">6</option>
                    <option <?php if($sess->get('airbag') == 7) echo 'selected="selected"';?> value="7">7</option>
                    <option <?php if($sess->get('airbag') == 8) echo 'selected="selected"';?> value="8">8</option>
                    <option <?php if($sess->get('airbag') == 9) echo 'selected="selected"';?> value="9">9</option>
                    <option <?php if($sess->get('airbag') == 10) echo 'selected="selected"';?> value="10">10</option>
                    <option <?php if($sess->get('airbag') == 11) echo 'selected="selected"';?> value="11">11</option>
                    <option <?php if($sess->get('airbag') == 12) echo 'selected="selected"';?> value="12">12</option>
                    <option <?php if($sess->get('airbag') == 13) echo 'selected="selected"';?> value="13">13</option>
                    <option <?php if($sess->get('airbag') == 14) echo 'selected="selected"';?> value="14">14</option>
                 </select>
                </td>
              </tr>
            </tbody>
            </table>
            <div class="cb"></div>
            <div class="m20t"></div>
            <h3 class="boder_b_d">Interiør</h3>
            <table width="303" cellspacing="0" cellpadding="0" border="0" class="m3b frm-other">
              <tbody>
              <tr>
                <td ><input type="checkbox" id="armrest" name="armrest" <?php if($sess->get('armrest')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Armlæn</label></td>
                <td><input type="checkbox" id="split_seat" name="split_seat" <?php if($sess->get('split_seat')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Splitbagsæde</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="wood" name="wood" <?php if($sess->get('wood')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Træinteriør</label></td>
                <td><input type="checkbox" id="leather_steering" name="leather_steering" <?php if($sess->get('leather_steering')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Læderrat</label></td>
              </tr>
              <tr>
               
                <td colspan="2">
                  <label for="checkbox">Sædebetræk  </label>
                  <select style="text-align:center;" class="w100" name="seat_cover">
                    <option <?php if($sess->get('seat_cover') == 'Stof') echo 'selected="selected"';?> value="Stof">Stof </option>
                    <option <?php if($sess->get('seat_cover') == 'Læder') echo 'selected="selected"';?> value="Læder">Læder </option>
                    <option <?php if($sess->get('seat_cover') == 'Dellæder') echo 'selected="selected"';?> value="Dellæder">Dellæder</option>
                 </select>
                </td>
              </tr>
            </tbody>
            </table>
            <div class="cl"></div>
            
            <label>Justérbart rat:</label>
            <div class="m10t">
                <input name="flexible" type="radio"  value="Ja" <?php if($sess->get('flexible') == 'Ja') echo 'checked="checked"';?> /><span class="pblack"> Ja &nbsp; &nbsp;</span>
                <input name="flexible" type="radio"  value="Nej" <?php if($sess->get('flexible') == 'Nej' || !$sess->get('flexible')) echo 'checked="checked"';?> /><span class="pblack"> Nej</span>
            </div>
             
            <div class="cl"></div>
            <label>Dæk og fælge:</label>
            <div class="cl"></div>
            <input type="radio" name="raddek" id="stand" onchange="checkTire();" <?php if($sess->get('stand_tire') || !$sess->get('alu_tire')) echo 'checked="checked"';?> /><span class="p-black m5r">Stål </span>
            <select disabled="disabled" class="w50" name="stand_tire" id="stand_tire">
                <option <?php if($sess->get('stand_tire') == 'Stål 13') echo 'selected="selected"';?> value="Stål 13">13</option>
                <option <?php if($sess->get('stand_tire') == 'Stål 14') echo 'selected="selected"';?> value="Stål 14">14</option>
                <option <?php if($sess->get('stand_tire') == 'Stål 15') echo 'selected="selected"';?> value="Stål 15">15</option>
                <option <?php if($sess->get('stand_tire') == 'Stål 16') echo 'selected="selected"';?> value="Stål 16">16</option>
                <option <?php if($sess->get('stand_tire') == 'Stål 17') echo 'selected="selected"';?> value="Stål 17">17</option>
                <option <?php if($sess->get('stand_tire') == 'Stål 18') echo 'selected="selected"';?> value="Stål 18">18</option>
            </select>
            <input type="radio" name="raddek" class="m12l" id="alu" onchange="checkTire();" <?php if($sess->get('alu_tire')) echo 'checked="checked"';?>/><span class="p-black m5r">Alu </span>
            <select disabled="disabled" class="w50" name="alu_tire" id="alu_tire">
                <option <?php if($sess->get('alu_tire') == 'Alu 13') echo 'selected="selected"';?> value="Alu 13">13</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 14') echo 'selected="selected"';?> value="Alu 14">14</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 15') echo 'selected="selected"';?> value="Alu 15">15</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 16') echo 'selected="selected"';?> value="Alu 16">16</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 17') echo 'selected="selected"';?> value="Alu 17">17</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 18') echo 'selected="selected"';?> value="Alu 18">18</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 19') echo 'selected="selected"';?> value="Alu 19">19</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 20') echo 'selected="selected"';?> value="Alu 20">20</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 21') echo 'selected="selected"';?> value="Alu 21">21</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 22') echo 'selected="selected"';?> value="Alu 22">22</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 23') echo 'selected="selected"';?> value="Alu 23">23</option>
                <option <?php if($sess->get('alu_tire') == 'Alu 24') echo 'selected="selected"';?> value="Alu 24">24</option>
            </select>
            <div class="cl"></div>
            <label style="width:130px;">Medfølger vinterdæk:</label>
            <div class="m10t">
            	<input name="heated_mirror" type="radio"  value="Nej" <?php if($sess->get('heated_mirror') == 'Nej' || !$sess->get('heated_mirror')) echo 'checked="checked"';?> /><span class="pblack"> Nej &nbsp; &nbsp;</span>
                <input name="heated_mirror" type="radio"  value="Ja" <?php if($sess->get('heated_mirror') == 'Ja') echo 'checked="checked"';?> /><span class="pblack"> Ja</span>
                
            </div>
            <div class="cl m10t"></div>
            <label for="checkbox">Dækmønster <span>(mm)</span>: </label>
              <select style="text-align:center;" class="w100" name="tread">
                <option <?php if($sess->get('tread') == 'Under 3') echo 'selected="selected"';?> value="Under 3">Under 3 </option>
                <option <?php if($sess->get('tread') == 'Over 3') echo 'selected="selected"';?> value="Over 3">Over 3 </option>
                <option <?php if($sess->get('tread') == 'Over 10') echo 'selected="selected"';?> value="Over 10">Over 10</option>
             </select>        
            
            </div>
            <div class="rightcol-auto m20t m42l w325 float_right">
            <h3 class="boder_b_d">Komfort</h3>
            <table width="303" cellspacing="0" cellpadding="0" border="0" class="m3b">
              <tbody><tr>
                <td><input type="checkbox" id="air_con" name="air_con" <?php if($sess->get('air_con')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Aircondition</label></td>
                <td><input type="checkbox" id="elec_mirror" name="elec_mirror" <?php if($sess->get('elec_mirror')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Elsidespejle</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="sensor" name="sensor" <?php if($sess->get('sensor')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Parkeringssensor</label></td>
                <td><input type="checkbox" id="elc_heat_mirror" name="elc_heat_mirror" <?php if($sess->get('elc_heat_mirror')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Elspejle med varme</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="elec_seat" name="elec_seat" <?php if($sess->get('elec_seat')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Elsæder</label></td>
                <td><input type="checkbox" id="radio" name="radio" <?php if($sess->get('radio')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Radio med cd</label></td>
              </tr>
    
            <tr>
                <td><input type="checkbox" id="central" name="central" <?php if($sess->get('central')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Centrallås</label></td>
                <td><input type="checkbox" id="cruise" name="cruise" <?php if($sess->get('cruise')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Fartpilot</label></td>
              </tr>
    
            <tr>
                <td><input type="checkbox" id="servo" name="servo" <?php if($sess->get('servo')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Servo</label></td>
                <td><input type="checkbox" id="remote" name="remote" <?php if($sess->get('remote')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Centrallås fjernb.</label></td>
              </tr>
    
    
                <tr>
                <td><input type="checkbox" id="gps" name="gps" <?php if($sess->get('gps')) echo 'checked="checked"';?>/>
                  <label for="checkbox">GPS-navigation</label></td>
                <td><input type="checkbox" id="sunroof" name="sunroof" <?php if($sess->get('sunroof')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Soltag</label></td>
              </tr>
    
    
            <tr>
                <td><input type="checkbox" id="power_window" name="power_window" <?php if($sess->get('power_window')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Elruder</label></td>
                <td><input type="checkbox" id="air_con1" name="air_con1" <?php if($sess->get('air_con1')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Klimaanlæg</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="elec_sunroof" name="elec_sunroof" <?php if($sess->get('elec_sunroof')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Soltag elektrisk</label></td>
                <td><input type="checkbox" id="automatic" name="automatic" <?php if($sess->get('automatic')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Automatgear</label></td>
              </tr>
    
             <tr>
                <td><input type="checkbox" id="computer" name="computer" <?php if($sess->get('computer')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Kørecomputer</label></td>
                <td><input type="checkbox" id="heated_seat" name="heated_seat" <?php if($sess->get('heated_seat')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Varme i sæder</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="power_steering" name="power_steering" <?php if($sess->get('power_steering')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Servostyring</label></td>
                <td><input type="checkbox" id="bak_sensor" name="bak_sensor" <?php if($sess->get('bak_sensor')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Bak-sensor (PDC)</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="elec_adj_seat" name="elec_adj_seat" <?php if($sess->get('elec_adj_seat')) echo 'checked="checked"';?>/>
                  <label for="checkbox">El-indstillelige sæder</label></td>
                <td><!--<input type="checkbox" id="heated_mirror" name="heated_mirror" <?php if($sess->get('heated_mirror')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Varme i spejle</label>--></td>
              </tr>
    
    
            </tbody>
            </table>
            <div class="cb m10t"></div>
            <h3 class="boder_b_d">Udvendigt</h3>
            <table width="303" cellspacing="0" cellpadding="0" border="0" class="m3b">
              <tbody><tr>
                <td><input type="checkbox" id="towbar" name="towbar" <?php if($sess->get('towbar')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Anhængertræk</label></td>
                <td><input type="checkbox" id="lower" name="lower" <?php if($sess->get('lower')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Sænket undervogn</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="fog_light" name="fog_light" <?php if($sess->get('fog_light')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Tågelygter</label></td>
                <td><input type="checkbox" id="removable_towbar" name="removable_towbar" <?php if($sess->get('removable_towbar')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Anhæng. aftageligt</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="xenon" name="xenon" <?php if($sess->get('xenon')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Xenonlygter</label></td>
                <td><input type="checkbox" id="roof_rail" name="roof_rail" <?php if($sess->get('roof_rail')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Tagræling</label></td>
              </tr>
              <tr>
                <td><input type="checkbox" id="lamp_washer" name="lamp_washer" <?php if($sess->get('lamp_washer')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Lygtevasker</label></td>
                <td><input type="checkbox" id="spoiler" name="spoiler" <?php if($sess->get('spoiler')) echo 'checked="checked"';?>/>
                  <label for="checkbox">Spoiler</label></td>
              </tr>
    
            </tbody>
            </table>
            
        </div></form>
        <div class="cb"></div>
        <div class="m15t">
        	<?php if(JRequest::getVar('action') == 'edit'){?>
            <a href="javascript:void(0);" class="bt_save float_left btn" onclick="submitCar();"></a>
            <input type="hidden" name="action" value="edit" />
            <?php } else {?>
            <a class="bt_next1 float_left btn" href="javascript:void(0);" onclick="submitCar();"></a>
            <a class="btn_back float_left btn m12l" href="index.php?option=com_ecommerce&view=register&Itemid=7&layout=step1"></a>
            <?php }?>
            
        </div>
	</div>
</div>